#include "eigen/padding_test.h"

#include <assert.h>
#include "eigen/eigen_equal.h"
#include "eigen/padding.h"
#include "log.h"


static const Eigen::MatrixXf input{
{1,2,3},
{4,5,6},
{7,8,9},
};

static const Eigen::MatrixXf expect_output{
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
{0,0,1,2,3,0,0},
{0,0,4,5,6,0,0},
{0,0,7,8,9,0,0},
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
};

namespace  ldl_eigen
{
void PaddingTest::test()
{
    Padding padding{};
    auto output = padding.add_padding(input, 2);
    // LogInfo() << "output: " << output;
    assert(EigenEqual::equal(output, expect_output, 1e-5));
    LogInfo() << "PaddingTest test success.";
}
}